function validatePersonalInfo()

		{

			if (document.PersonalInfo.txtFirstName.value == ""

				|| document.PersonalInfo.txtLastName.value == ""

			<?php

				/* ToDo: figure out how to check for whitespace only nicks */

				if ($CFG_NICKCHANGEALLOWED)

					echo ('|| document.PersonalInfo.txtNick.value == ""');

			?>

				|| document.PersonalInfo.pwdOldPassword.value == ""

				|| document.PersonalInfo.pwdPassword.value == "")

			{

				alert("Debe rellenar todos los campos.");

				return;

			}



			if (document.PersonalInfo.pwdPassword.value == document.PersonalInfo.pwdPassword2.value)

				

				document.datos_personales_administrador.php.submit();

			else

				alert("No coinciden los dos campos para la clave(password).");

		}



		function sendResponse(responseType, messageFrom, gameID)

		{

			document.responseToInvite.response.value = responseType;

			document.responseToInvite.messageFrom.value = messageFrom;

			document.responseToInvite.gameID.value = gameID;

			document.responseToInvite.submit();

		}



		function loadGame(gameID)

		{

			if (document.existingGames.rdoShare[0].checked)

				document.existingGames.action = "opponentspassword.php";



			document.existingGames.gameID.value = gameID;

			document.existingGames.submit();

		}



		function withdrawRequest(gameID)

		{

			document.withdrawRequestForm.gameID.value = gameID;

			document.withdrawRequestForm.submit();

		}



		function viewMessage(gameID)

		{

			document.messageViewForm.messageID.value = gameID;

			document.messageViewForm.submit();

		}



		function loadEndedGame(gameID)

		{

			document.endedGames.gameID.value = gameID;

			document.endedGames.submit();

		}

<?php if ($CFG_USEEMAILNOTIFICATION) { ?>

		function testEmail()

		{

			document.userdata.ToDo.value = "TestEmail";

			document.userdata.submit();

		} 

<?php } ?>

	function challenge() {

		window.location = 'inviteplayer.php';

	}



	function reload() {

		window.location.replace(window.location.href);

	}



	function logout() {	
		
		window.location.replace('index.php');
			
	}



function volver_Mensajes()

{

 window.location.replace('Mensajes.php');

 }

 

 function mensaje_interno2()

{

 window.location.replace('enviar_mensaje_interno2.php');

 }

